package com.example.service;

import com.example.entity.Dept;
import com.example.manager.DeptManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class DeptService {
    @Autowired
    private DeptManager deptManager;

    public void insertDept(Dept dept){
        deptManager.insertDept(dept);
        System.out.println("End!");
    }

    public void insertDept(Dept dept,int str){
        try {
            deptManager.insertDept(dept,str);
            System.out.println("End!");
        }catch (Exception e){
            System.out.println(str + "次错误！");
        }

    }
}
